//
// Created by hay boy on 2022/7/18.
//

#ifndef ALGORITHMS_BINARYTREENODE_H
#define ALGORITHMS_BINARYTREENODE_H
template<class T>
struct binaryTreeNode {
    T element;
    binaryTreeNode<T> *leftChild,*rightChild;
    binaryTreeNode(){
        leftChild = rightChild = nullptr;
    }
    explicit binaryTreeNode(const T& theElement):element(theElement){
        leftChild = rightChild = nullptr;
    }
    binaryTreeNode(const T& theElement,binaryTreeNode<T>* theLeftChild,binaryTreeNode<T>* theRightNode):element(theElement){
        leftChild = theLeftChild;
        rightChild = theRightNode;
    }
    void preOrder(binaryTreeNode<T>* t);
    void inOrder(binaryTreeNode<T>* t);
    void postOrder(binaryTreeNode<T>* t);
    void visit(binaryTreeNode<T>* x);
    void infix(binaryTreeNode<T>* t);
    void levelOrder(binaryTreeNode<T>* t);
};



#endif //ALGORITHMS_BINARYTREENODE_H
